package com.doeis.client;


import com.doeis.minaserver.module.InfoPacketRouter;
import com.doeis.minaserver.packet.InfoPacket;
import com.doeis.minaserver.packet.Packet;
import com.doeis.minaserver.packet.Packet.PacketType;
import com.doeis.uwork.packet.GroupMsgPacket;
import com.doeis.uwork.packet.PrivateMsgPacket;

/**
 * 对收到的数据包进行处理
 * @author tianbx
 */
public class PacketHandler {
	
	private InfoPacketRouter infoRouter;
	
	
	public PacketHandler(){
		infoRouter = new InfoPacketRouter();
	}
	
	public void process(Packet packet){
		
		try{
			PacketType type = packet.getPacketType();
			switch (type) {
			case info:{
				InfoPacket p = (InfoPacket)packet;	
				System.err.println(p.getBody());
				break;
			}
			
			default:
				break;
			}
		}catch (Exception e) {
			e.printStackTrace();
		}
	}

}
